package com.maktoub.project.service.impl.provider;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.maktoub.common.model.entity.InterfaceInfo;
import com.maktoub.common.service.RemoteInterfaceInfoService;
import com.maktoub.project.service.InterfaceInfoService;
import org.apache.dubbo.config.annotation.DubboService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * @author Maktoub
 * @description 针对表【interface_info(接口信息)】的数据库操作Service实现
 * @createDate 2024-05-07 09:34:49
 */
@Service
@DubboService
public class RemoteInterfaceInfoServiceImpl
        implements RemoteInterfaceInfoService {

    @Autowired
    InterfaceInfoService interfaceInfoService;
    @Override
    public InterfaceInfo checkInterfaceExist(String path,String method) {
        LambdaQueryWrapper<InterfaceInfo> eq = new LambdaQueryWrapper<InterfaceInfo>()
                .eq(InterfaceInfo::getUrl, path)
                .eq(InterfaceInfo::getMethod, method);
        InterfaceInfo byId = interfaceInfoService.getOne(eq);
        return byId;
    }

}





